package com.ruoyix.aicode.domain;

import java.util.Map;

/**
 * 消息类，用于追踪对话历史
 */
public class Message {
    private String role;
    private String content;

    public Message(String role, String content) {
        this.role = role;
        this.content = content;
    }

    public Map<String, String> toMap() {
        return Map.of("role", role, "content", content);
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
}
